
//显示用户
function displayuser(userid)
{
	location.href="index.php?page=3 & thisuser="+userid;
}

var XMLHttpRequestObject=false;
if(window.XMLHttpRequest)
{
	XMLHttpRequestObject=new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
	XMLHttpRequestObject=new ActiveXObject("Microsoft.XMLHTTP");
}

//通过ajax获取信息，地址为dataSource，获取内容在divID中，传输数据位data
function getmessage(dataSource,divID,data)
{
	if(XMLHttpRequestObject)
	{
		var obj=document.getElementById(divID);
		XMLHttpRequestObject.open("POST",dataSource,true);
		XMLHttpRequestObject.setRequestHeader("Content-Type","application/x-www-form-urlencoded");  
		XMLHttpRequestObject.send("data="+data);
		XMLHttpRequestObject.onreadystatechange=function ()
		{
			if(XMLHttpRequestObject.readyState==4&&XMLHttpRequestObject.status==200)
			{
				obj.innerHTML=XMLHttpRequestObject.responseText;
			}
			else
			{
				obj.innerHTML="正在获取信息中……";
			}
		}
		
	}
}

//处理函数
function getcheck(data,action)
{

	if(XMLHttpRequestObject)
	{
		XMLHttpRequestObject.open("POST","dispose.php",true);
		XMLHttpRequestObject.setRequestHeader("Content-Type","application/x-www-form-urlencoded");  
		XMLHttpRequestObject.send("ruserid="+data+"&action="+action);
		XMLHttpRequestObject.onreadystatechange=function ()
		{
			if(XMLHttpRequestObject.readyState==4&&XMLHttpRequestObject.status==200)
			{
				alert(XMLHttpRequestObject.responseText);
				location.href='index.php?page=2';

			}
			else
			{
			}
		}
		
	}
}
//修改资料
function changemodel()
{
	var obj=document.getElementsByClassName('updatem');
	for (var i = 0; i < obj.length; i++) {
		obj[i].style.display='block';
	}
	var obj2=document.getElementsByClassName('messeage');
	for (var i = 0; i < obj.length; i++) {
		obj2[i].style.display='none';
	}
}
function changemodel2()
{
	var obj=document.getElementsByClassName('messeage');
	for (var i = 0; i < obj.length; i++) {
		obj[i].style.display='block';
	}
	var obj2=document.getElementsByClassName('updatem');
	for (var i = 0; i < obj.length; i++) {
		obj2[i].style.display='none';
	}
}

//修改密码
function updatepw(){
	
}